//
//  VCB.swift
//  TestPresentingViewController
//
//  Created by 李煜 on 2024/2/20.
//

import UIKit

class VCB: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .systemOrange
        print("---VCB---", self)
    }

    @IBAction func toC(_ sender: Any) {
        let c = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "VCC")
        c.modalPresentationStyle = .overFullScreen
        present(c, animated: true)

//c为d的容器,b的presentedViewController是c而不是d
        print("---VCB.presentedViewController---",self.presentedViewController as Any);
    }
}
